Developer --> Technical Publications
PATHMac OS 8 Developer Documentation > Human Interface Toolbox > Window Manager >

Mac OS 8 Window Manager Reference


Window Manager Data Types

The following Window Manager data types are new, changed, or not recommended with Mac OS 8 or Appearance Manager 1.0:


WindowRecord

In Mac OS 8, you should use the color window structure instead of the window structure, since Color QuickDraw is always available with Mac OS 8. The WindowRecord structure is not recommended with Mac OS 8 and later.


WinCTab

The WinCTab (window color table) structure is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and you are using standard windows, all information in the window color table structure is ignored except the part identifier constant wContentColor in the value field of the ColorSpec structure. This constant produces the background color for the window's content region. If your are creating your own custom window definition functions, the window color table structure can still be used.


AuxWinRec

The AuxWinRec (auxiliary window) structure is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and you are using standard windows, most of the fields of the auxiliary window structure are ignored. In the future, standard system windows may not have entries in the auxiliary window list. If you are creating your own window definition function, the auxiliary window structure can still be used.


'WIND'

The window resource is changed with Appearance Manager 1.0 to support the Window Manager's new, standard window types. See Window Definition IDs for a description of the Appearance-compliant window types.

You typically define a window ( 'WIND' ) resource for each type of window that your application creates. Use GetNewWindow or GetNewCWindow to create a window based on a 'WIND' resource. Both functions create a new window structure and fill it in according to the values specified in the 'WIND' resource.


Note

Window resources must have resource ID numbers greater than 127.

Figure 1-1 illustrates a compiled 'WIND' resource.

Figure 1-1 Structure of a compiled window ('WIND') resource

A compiled version of a window resource contains the following elements:


'wctb'

The window color table ('wctb') resource is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and you are using standard windows, all information in the window color table resource is ignored except the part identifier constant wContentColor in the value field of the ColorSpec structure. This constant produces the background color for the window's content region.

If your are creating your own custom window definition functions, the window color table resource can still be used.


'WDEF'

The window definition ( 'WDEF') resource is changed with Appearance Manager 1.0 to support the window definition message constants kWindowMsgGetFeatures and kWindowMsgGetRegion.

The window definition resource is the executable code for your window definition function. Provide as the resource data the compiled or assembled code of your window definition procedure. The entry point of your procedure must be at the beginning of the resource data.

See MyWindowDefProc for more information about creating a window definition function.


WARNING

All resources of type 'WDEF' should be nonpurgeable, to ensure that the resource is always loaded. If the resource is not available when the Window Manager needs to load it, a crash will occur.


© 1998 Apple Computer, Inc. - (Last Updated 19 Nov 98)

Previous | Back Up One Level | Next |